<?php
/*
 * Copyright (c) 2017-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
namespace TencentCloud\Ocr\V20181119\Models;
use TencentCloud\Common\AbstractModel;

/**
 * MLIDPassportOCR response structure.
 *
 * @method string getID() Obtain Passport ID
 * @method void setID(string $ID) Set Passport ID
 * @method string getName() Obtain Name
 * @method void setName(string $Name) Set Name
 * @method string getDateOfBirth() Obtain Date of birth
 * @method void setDateOfBirth(string $DateOfBirth) Set Date of birth
 * @method string getSex() Obtain Gender (F: female, M: male)
 * @method void setSex(string $Sex) Set Gender (F: female, M: male)
 * @method string getDateOfExpiration() Obtain Expiration date
 * @method void setDateOfExpiration(string $DateOfExpiration) Set Expiration date
 * @method string getIssuingCountry() Obtain Issuing country
 * @method void setIssuingCountry(string $IssuingCountry) Set Issuing country
 * @method string getNationality() Obtain Country/region code
 * @method void setNationality(string $Nationality) Set Country/region code
 * @method array getWarn() Obtain This field is deprecated and will always return an empty array. Usage is not recommended.
 * @method void setWarn(array $Warn) Set This field is deprecated and will always return an empty array. Usage is not recommended.
 * @method string getImage() Obtain Identity photo
 * @method void setImage(string $Image) Set Identity photo
 * @method string getAdvancedInfo() Obtain This field is deprecated and will always return "1". Usage is not recommended.
 * @method void setAdvancedInfo(string $AdvancedInfo) Set This field is deprecated and will always return "1". Usage is not recommended.
 * @method string getCodeSet() Obtain The first row of the machine-readable zone (MRZ) at the bottom
 * @method void setCodeSet(string $CodeSet) Set The first row of the machine-readable zone (MRZ) at the bottom
 * @method string getCodeCrc() Obtain The second row of the MRZ at the bottom
 * @method void setCodeCrc(string $CodeCrc) Set The second row of the MRZ at the bottom
 * @method string getSurname() Obtain The surname.
Note: This field may return null, indicating that no valid values can be obtained.
 * @method void setSurname(string $Surname) Set The surname.
Note: This field may return null, indicating that no valid values can be obtained.
 * @method string getGivenName() Obtain The given name.
Note: This field may return null, indicating that no valid values can be obtained.
 * @method void setGivenName(string $GivenName) Set The given name.
Note: This field may return null, indicating that no valid values can be obtained.
 * @method string getType() Obtain Type (in Machine Readable Zone)
 * @method void setType(string $Type) Set Type (in Machine Readable Zone)
 * @method PassportRecognizeInfos getPassportRecognizeInfos() Obtain Document content in Information Zone
 * @method void setPassportRecognizeInfos(PassportRecognizeInfos $PassportRecognizeInfos) Set Document content in Information Zone
 * @method array getWarnCardInfos() Obtain Card Warning Information

-9101 Alarm for covered certificate,
-9102 Alarm for photocopied certificate,
-9103 Alarm for photographed certificate,
-9104 Alarm for PS certificate,
-9107 Alarm for reflective certificate,
-9108 Alarm for blurry image,
-9109 This capability is not enabled.
 * @method void setWarnCardInfos(array $WarnCardInfos) Set Card Warning Information

-9101 Alarm for covered certificate,
-9102 Alarm for photocopied certificate,
-9103 Alarm for photographed certificate,
-9104 Alarm for PS certificate,
-9107 Alarm for reflective certificate,
-9108 Alarm for blurry image,
-9109 This capability is not enabled.
 * @method integer getCardCount() Obtain The number of cards detected in the input image.(Currently supported only in ap-bangkok region)
 * @method void setCardCount(integer $CardCount) Set The number of cards detected in the input image.(Currently supported only in ap-bangkok region)
 * @method string getRequestId() Obtain The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 * @method void setRequestId(string $RequestId) Set The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 */
class MLIDPassportOCRResponse extends AbstractModel
{
    /**
     * @var string Passport ID
     */
    public $ID;

    /**
     * @var string Name
     */
    public $Name;

    /**
     * @var string Date of birth
     */
    public $DateOfBirth;

    /**
     * @var string Gender (F: female, M: male)
     */
    public $Sex;

    /**
     * @var string Expiration date
     */
    public $DateOfExpiration;

    /**
     * @var string Issuing country
     */
    public $IssuingCountry;

    /**
     * @var string Country/region code
     */
    public $Nationality;

    /**
     * @var array This field is deprecated and will always return an empty array. Usage is not recommended.
     * @deprecated
     */
    public $Warn;

    /**
     * @var string Identity photo
     */
    public $Image;

    /**
     * @var string This field is deprecated and will always return "1". Usage is not recommended.
     * @deprecated
     */
    public $AdvancedInfo;

    /**
     * @var string The first row of the machine-readable zone (MRZ) at the bottom
     */
    public $CodeSet;

    /**
     * @var string The second row of the MRZ at the bottom
     */
    public $CodeCrc;

    /**
     * @var string The surname.
Note: This field may return null, indicating that no valid values can be obtained.
     */
    public $Surname;

    /**
     * @var string The given name.
Note: This field may return null, indicating that no valid values can be obtained.
     */
    public $GivenName;

    /**
     * @var string Type (in Machine Readable Zone)
     */
    public $Type;

    /**
     * @var PassportRecognizeInfos Document content in Information Zone
     */
    public $PassportRecognizeInfos;

    /**
     * @var array Card Warning Information

-9101 Alarm for covered certificate,
-9102 Alarm for photocopied certificate,
-9103 Alarm for photographed certificate,
-9104 Alarm for PS certificate,
-9107 Alarm for reflective certificate,
-9108 Alarm for blurry image,
-9109 This capability is not enabled.
     */
    public $WarnCardInfos;

    /**
     * @var integer The number of cards detected in the input image.(Currently supported only in ap-bangkok region)
     */
    public $CardCount;

    /**
     * @var string The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    public $RequestId;

    /**
     * @param string $ID Passport ID
     * @param string $Name Name
     * @param string $DateOfBirth Date of birth
     * @param string $Sex Gender (F: female, M: male)
     * @param string $DateOfExpiration Expiration date
     * @param string $IssuingCountry Issuing country
     * @param string $Nationality Country/region code
     * @param array $Warn This field is deprecated and will always return an empty array. Usage is not recommended.
     * @param string $Image Identity photo
     * @param string $AdvancedInfo This field is deprecated and will always return "1". Usage is not recommended.
     * @param string $CodeSet The first row of the machine-readable zone (MRZ) at the bottom
     * @param string $CodeCrc The second row of the MRZ at the bottom
     * @param string $Surname The surname.
Note: This field may return null, indicating that no valid values can be obtained.
     * @param string $GivenName The given name.
Note: This field may return null, indicating that no valid values can be obtained.
     * @param string $Type Type (in Machine Readable Zone)
     * @param PassportRecognizeInfos $PassportRecognizeInfos Document content in Information Zone
     * @param array $WarnCardInfos Card Warning Information

-9101 Alarm for covered certificate,
-9102 Alarm for photocopied certificate,
-9103 Alarm for photographed certificate,
-9104 Alarm for PS certificate,
-9107 Alarm for reflective certificate,
-9108 Alarm for blurry image,
-9109 This capability is not enabled.
     * @param integer $CardCount The number of cards detected in the input image.(Currently supported only in ap-bangkok region)
     * @param string $RequestId The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    function __construct()
    {

    }

    /**
     * For internal only. DO NOT USE IT.
     */
    public function deserialize($param)
    {
        if ($param === null) {
            return;
        }
        if (array_key_exists("ID",$param) and $param["ID"] !== null) {
            $this->ID = $param["ID"];
        }

        if (array_key_exists("Name",$param) and $param["Name"] !== null) {
            $this->Name = $param["Name"];
        }

        if (array_key_exists("DateOfBirth",$param) and $param["DateOfBirth"] !== null) {
            $this->DateOfBirth = $param["DateOfBirth"];
        }

        if (array_key_exists("Sex",$param) and $param["Sex"] !== null) {
            $this->Sex = $param["Sex"];
        }

        if (array_key_exists("DateOfExpiration",$param) and $param["DateOfExpiration"] !== null) {
            $this->DateOfExpiration = $param["DateOfExpiration"];
        }

        if (array_key_exists("IssuingCountry",$param) and $param["IssuingCountry"] !== null) {
            $this->IssuingCountry = $param["IssuingCountry"];
        }

        if (array_key_exists("Nationality",$param) and $param["Nationality"] !== null) {
            $this->Nationality = $param["Nationality"];
        }

        if (array_key_exists("Warn",$param) and $param["Warn"] !== null) {
            $this->Warn = $param["Warn"];
        }

        if (array_key_exists("Image",$param) and $param["Image"] !== null) {
            $this->Image = $param["Image"];
        }

        if (array_key_exists("AdvancedInfo",$param) and $param["AdvancedInfo"] !== null) {
            $this->AdvancedInfo = $param["AdvancedInfo"];
        }

        if (array_key_exists("CodeSet",$param) and $param["CodeSet"] !== null) {
            $this->CodeSet = $param["CodeSet"];
        }

        if (array_key_exists("CodeCrc",$param) and $param["CodeCrc"] !== null) {
            $this->CodeCrc = $param["CodeCrc"];
        }

        if (array_key_exists("Surname",$param) and $param["Surname"] !== null) {
            $this->Surname = $param["Surname"];
        }

        if (array_key_exists("GivenName",$param) and $param["GivenName"] !== null) {
            $this->GivenName = $param["GivenName"];
        }

        if (array_key_exists("Type",$param) and $param["Type"] !== null) {
            $this->Type = $param["Type"];
        }

        if (array_key_exists("PassportRecognizeInfos",$param) and $param["PassportRecognizeInfos"] !== null) {
            $this->PassportRecognizeInfos = new PassportRecognizeInfos();
            $this->PassportRecognizeInfos->deserialize($param["PassportRecognizeInfos"]);
        }

        if (array_key_exists("WarnCardInfos",$param) and $param["WarnCardInfos"] !== null) {
            $this->WarnCardInfos = $param["WarnCardInfos"];
        }

        if (array_key_exists("CardCount",$param) and $param["CardCount"] !== null) {
            $this->CardCount = $param["CardCount"];
        }

        if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
            $this->RequestId = $param["RequestId"];
        }
    }
}
